import {createBrowserRouter} from 'react-router-dom';
import Login from './page/login';
import Student from './page/student';
import Teacher from './page/teacher';
import Admin from './page/admin';
import Article from './page/article';


const router  = createBrowserRouter([
    {
        path: '/',
        element: <Login></Login>,
        children: [
            {
                path: '/student',
                element: <Student></Student>
            },
            {
                path: '/teacher',
                element: <Teacher></Teacher>
            },
            {
                path: '/admin',
                element: <Admin></Admin>
            }
        ]
    },
    {
        path: '/article/:id',
        element: <Article></Article>
    }
]);

export default router;